<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>圣罗兰购物车</title>
  <link rel="stylesheet" href="/libs/bootstrap/css/bootstrap.min.css">
  <link rel="stylesheet" href="/libs/font/iconfont.css">
  <link rel="stylesheet" href="/css/shoppingCart.css">
</head>
<body>
  <!-- 头部 -->
  <header></header>

  <!-- 指示 -->
  <div class="shouYe">
    <div class="xing">
      <a href="http://localhost:2333">首页</a>
      <i class="glyphicon glyphicon-chevron-right"></i>
      <a href="">购物车</a>
    </div>
  </div>

  <!-- 标题 -->
  <div class="biaoTi">
    <p>购物车</p>
  </div>
  <!-- 列表 -->
  <div class="panel panel-default">
    <!-- Table -->
    <table class="table">
      <thead>
        <th><input type="checkbox" id="all-check"></th>
        <th>全选</th>
        <th>商品信息</th>
        <th>单价</th>
        <th>数量</th>
        <th>总计</th>
      </thead>
      <tbody id="shop_tbody">
        
      </tbody>
      <tfoot>
        <tr>
          <td></td>
          <td></td>
          <td>总价￥：<span id="Paymoney" style="font-weight: 600;font-size: 16px;color: gold;"></span>元</td>
          <td></td>
          <td></td>
          <td>
            <button>付款</button>
          </td>
        </tr>
      </tfoot>
    </table>
    <script type="text/html" id="shop_tbody_template">
    {{each cart shop}}
    <tr data-id="{{shop.id}}">
      <td>
        <input type="checkbox" class="checks" {{shop.check ? 'checked' : ''}} />
      </td>
      <td>
        <a href="/html/detail.html?id={{shop.id}}">
          <img src="{{shop.photo[0].url}}" alt="">
        </a>
      </td>
      <td>
        <div class="box">
          <p>{{shop.title.slice(0,20)}}...</p>
          <i class="glyphicon glyphicon-plus"></i>
          <a href="">心愿单</a>
          <a href="" class="del">删除</a>
        </div>
      </td>
      <td>
        <div class="price">
          ￥<span class="money">{{shop.price}}</span>
        </div>
      </td>
      <td>
        <div class="count">
          <button class="subNum">-</button>
          <input type="text" value="{{shop.count}}">
          <button class="addNum">+</button>
        </div>
      </td>
      <td>
        <div class="allPrice"> 
         ￥<span class="rowPrice">{{(shop.price * shop.count).toFixed(2)}}</span>
        </div>
      </td>
    </tr>
    {{/each}}
    </script>
  </div>
  <div class="empty" id="cart-empty">
    <p><i class="iconfont">&#xe618;</i>您的购物车还没有商品!</p>
    <a href="/index.html">返回首页</a>
    <a href="/index.html">去选款式</a>
  </div>


  <!-- 尾部 -->
  <footer></footer>
  <script src="/libs/require/require.min.js" data-main="/js/shoppingCart"></script>
</body>
</html>